
/**
 * @param {String} elegido
 * 
 * @properties={typeid:24,uuid:"70385CA4-273F-440F-B423-FC4D5A4EF33D"}
 */
function cambiarEstilo(elegido)
{
	var $form = solutionModel.getForm("menu_lateral")
	var $elems = $form.getLabels()
	var $cant = $elems.length
	for (var i = 0 ; i < $cant ; i++)
	{
		var $elem = $elems[i]
		if (elegido == $elem.name)
			$elem.styleClass = "buttonAzulOscuro"
		else
			$elem.styleClass = "buttonAzulPlain"	
	}
	forms[$form.name].controller.recreateUI()
}
/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"D0358692-8489-4CBC-8BA1-F5C34383BE1D"}
 */
function iraHotel(event) {
	cambiarEstilo(event.getElementName())
	forms.hoteles_dtl.controller.show()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"A67FE2F4-0FD0-480D-A2BB-B5EAD0E1861B"}
 */
function iraClientes(event) {
	cambiarEstilo(event.getElementName())
	forms.clientes_tbl.controller.show()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"15AD5312-461F-435B-A101-EDAFF1391918"}
 */
function iraPromociones(event) {
	cambiarEstilo(event.getElementName())
	forms.promociones_cab_tbl.controller.show()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"BE600B24-DE33-4197-B162-21E968246927"}
 */
function iraTarifas(event) {
	cambiarEstilo(event.getElementName())
	forms.tarifas_tbl.controller.show()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"B6405CEE-62AD-466E-9946-A6311BC44302"}
 */
function iraTemporadas(event) {
	cambiarEstilo(event.getElementName())
	forms.temporadas_tbl.controller.show()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"5B968BAD-85F7-4D29-BF83-7C130552D0D2"}
 */
function iraHabitaciones(event) {
	cambiarEstilo(event.getElementName())
	forms.tipos_habitacion_tbl.controller.show()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"F0F37243-EF64-41F5-B56C-89E162088FF3"}
 */
function iraPrecios(event) {
	cambiarEstilo(event.getElementName())
	forms.carga_precios.controller.show()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"EE11103A-A685-44B2-B0FD-B565A7BE7A1E"}
 */
function iraMediosPago(event) {
	cambiarEstilo(event.getElementName())
	forms.medios_pago_tbl.controller.show()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"83AE4E92-A306-4519-A047-A0F238946E88"}
 */
function iraServicios(event) {
	cambiarEstilo(event.getElementName())
	forms.servicios_tbl.controller.show()
}

/**
 * Handle changed data.
 *
 * @param {Number} oldValue old value
 * @param {Number} newValue new value
 * @param {JSEvent} event the event that triggered the action
 *
 * @returns {Boolean}
 *
 * @properties={typeid:24,uuid:"B9A4C3E3-D345-4C86-B532-572CF155C518"}
 */
function onDataChangeHotel(oldValue, newValue, event) {
	globals.filtroHotel(newValue)
	return true
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"B0B4E1C3-EBCE-4841-8E6E-2E873A7CBCC5"}
 */
function iraUsuarios(event) {
	cambiarEstilo(event.getElementName())
	forms.usuarios_tbl.controller.show()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"537BB349-9C98-4000-A108-CF0B46873F16"}
 */
function iraHoteles(event) {
	cambiarEstilo(event.getElementName())
	forms.hoteles_tbl.controller.show()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"4775CC80-4B0E-4931-8978-F90BFF2DEC15"}
 */
function iraCadena(event) {
	cambiarEstilo(event.getElementName())
	forms.cadenas_dtl.controller.show()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"72FBCFBB-08D9-40E6-9814-4F142CD76B00"}
 */
function iraDisponibilidad(event) {
	cambiarEstilo(event.getElementName())
	forms.disponibilidad_main.controller.show()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"682E2320-F824-4055-ACB7-F0FD35FB1795"}
 */
function salir(event) {
	security.logout()
	application.exit()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"7CB1FB0C-502D-4B31-8540-8B78FAA3E298"}
 */
function iraReservas(event) {
	cambiarEstilo(event.getElementName())
	forms.reservas_tbl.controller.show()
}
